# -*- coding:utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render

from django.http import HttpResponse,HttpResponseRedirect
from django.shortcuts import render

# Create your views here.
from . import server

server.run()

def deviceView(request):
    return render(request, 'device/deviceView.html')

def taskView(request):
    tasks = server.getTask()
    return render(request, 'device/taskView.html', {'tasks': tasks})

def addTaskView(request):
    return render(request, 'device/addTaskView.html')

def matchtask(request):
    tasks = server.matchTask()
    return render(request, 'device/taskView.html', {'tasks': tasks})

def crateTask(request):
    print request['wind_act']
    # test.createTask()